package com.paypal.android.MEP.b;

import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;
import com.paypal.android.MEP.i;
import com.paypal.android.MEP.m;
import com.paypal.android.a.n;
import com.paypal.android.a.q;
import com.paypal.android.a.r;
import com.paypal.android.b.c;
import com.paypal.android.b.d;
import java.math.BigDecimal;
import java.util.ArrayList;

public final class f extends c
  implements View.OnTouchListener
{
  public f(Context paramContext, m paramm, String paramString)
  {
    super(paramContext);
    LinearLayout.LayoutParams localLayoutParams = new LinearLayout.LayoutParams(-1, -2);
    localLayoutParams.setMargins(3, 3, 3, 3);
    a(localLayoutParams, 0);
    a(localLayoutParams, 1);
    setBackgroundColor(0);
    a(com.paypal.android.a.g.a(130087, 2921));
    b(com.paypal.android.a.g.a(63352, 2927));
    setOnTouchListener(this);
    this.c.setPadding(5, 0, 5, 0);
    this.c.setBackgroundColor(-2763307);
    this.c.setGravity(16);
    this.c.addView(this.e);
    this.e.setVisibility(0);
    com.paypal.android.b.g localg1 = new com.paypal.android.b.g(paramContext, r.c, r.c);
    localg1.setPadding(3, 0, 0, 0);
    String str1 = paramm.h();
    if ((str1 == null) || (str1.length() == 0))
      str1 = paramm.a();
    String str2 = n.a(paramm.l(), paramString);
    localg1.a(str1);
    localg1.b(str2);
    this.c.addView(localg1);
    this.d.setPadding(10, 0, 0, 0);
    this.d.setOrientation(1);
    if ((paramm.c() != null) && (paramm.c().c() != null))
    {
      int i = paramm.c().c().size();
      int j = 0;
      if (i > 0)
      {
        if (j >= paramm.c().c().size())
          break label844;
        com.paypal.android.MEP.j localj = (com.paypal.android.MEP.j)paramm.c().c().get(j);
        String str3 = localj.a();
        String str4 = localj.b();
        BigDecimal localBigDecimal4 = localj.c();
        BigDecimal localBigDecimal5 = localj.d();
        int k = localj.e();
        com.paypal.android.b.g localg6;
        if (localj.f())
        {
          if ((str3 == null) || (str3.length() <= 0))
            break label685;
          localg6 = new com.paypal.android.b.g(paramContext, r.d, r.d);
          localg6.a(com.paypal.android.a.j.a("ANDROID_item") + ": " + localj.a());
          if ((localBigDecimal4 == null) || (localBigDecimal4.toString().length() <= 0))
            break label675;
          localg6.b(n.a(localBigDecimal4, paramString));
          label429: this.d.addView(localg6);
        }
        while (true)
        {
          if ((str4 != null) && (str4.length() > 0))
          {
            TextView localTextView3 = q.a(r.f, paramContext);
            localTextView3.setText(com.paypal.android.a.j.a("ANDROID_item_num") + ": " + str4);
            this.d.addView(localTextView3);
          }
          if ((localBigDecimal5 != null) && (localBigDecimal5.compareTo(BigDecimal.ZERO) > 0))
          {
            TextView localTextView2 = q.a(r.f, paramContext);
            localTextView2.setText(com.paypal.android.a.j.a("ANDROID_item_price") + ": " + n.a(localBigDecimal5, paramString));
            this.d.addView(localTextView2);
          }
          if (k > 0)
          {
            TextView localTextView1 = q.a(r.f, paramContext);
            localTextView1.setText(com.paypal.android.a.j.a("ANDROID_quantity") + ": " + k);
            this.d.addView(localTextView1);
          }
          if (j != -1 + paramm.c().c().size())
          {
            LinearLayout localLinearLayout = com.paypal.android.a.f.a(paramContext, 5, 5);
            localLinearLayout.setVisibility(4);
            this.d.addView(localLinearLayout);
          }
          j++;
          break;
          label675: localg6.b("");
          break label429;
          label685: if ((localBigDecimal4 != null) && (localBigDecimal4.compareTo(BigDecimal.ZERO) > 0))
          {
            com.paypal.android.b.g localg5 = new com.paypal.android.b.g(paramContext, r.d, r.d);
            localg5.a(com.paypal.android.a.j.a("ANDROID_item") + ": " + com.paypal.android.a.j.a("ANDROID_item") + " " + (j + 1));
            localg5.b(localBigDecimal4.toString());
            this.d.addView(localg5);
          }
        }
      }
    }
    BigDecimal localBigDecimal1 = paramm.b();
    if (localBigDecimal1 != null)
    {
      com.paypal.android.b.g localg2 = new com.paypal.android.b.g(paramContext, r.d, r.d);
      localg2.a(com.paypal.android.a.j.a("ANDROID_total"));
      localg2.b(n.a(localBigDecimal1, paramString));
      this.d.addView(localg2);
    }
    label844: if (paramm.c() != null);
    for (BigDecimal localBigDecimal2 = paramm.c().a(); ; localBigDecimal2 = null)
    {
      if ((localBigDecimal2 != null) && (localBigDecimal2.compareTo(BigDecimal.ZERO) > 0))
      {
        com.paypal.android.b.g localg4 = new com.paypal.android.b.g(paramContext, r.d, r.d);
        localg4.a(com.paypal.android.a.j.a("ANDROID_tax"));
        localg4.b(n.a(localBigDecimal2, paramString));
        this.d.addView(localg4);
      }
      if (paramm.c() != null);
      for (BigDecimal localBigDecimal3 = paramm.c().b(); ; localBigDecimal3 = null)
      {
        if ((localBigDecimal3 != null) && (localBigDecimal3.compareTo(BigDecimal.ZERO) > 0))
        {
          com.paypal.android.b.g localg3 = new com.paypal.android.b.g(paramContext, r.d, r.d);
          localg3.a(com.paypal.android.a.j.a("ANDROID_shipping"));
          localg3.b(n.a(localBigDecimal3, paramString));
          this.d.addView(localg3);
        }
        return;
      }
    }
  }

  public static LinearLayout a(Context paramContext, m paramm, String paramString)
  {
    LinearLayout localLinearLayout1 = new LinearLayout(paramContext);
    LinearLayout.LayoutParams localLayoutParams = new LinearLayout.LayoutParams(-1, -2);
    localLayoutParams.gravity = 1;
    localLinearLayout1.setLayoutParams(localLayoutParams);
    localLinearLayout1.setPadding(5, 0, 5, 5);
    localLinearLayout1.setPadding(10, 0, 0, 0);
    localLinearLayout1.setOrientation(1);
    if ((paramm.c() != null) && (paramm.c().c() != null) && (paramm.c().c().size() > 0))
    {
      int i = 0;
      if (i < paramm.c().c().size())
      {
        com.paypal.android.MEP.j localj = (com.paypal.android.MEP.j)paramm.c().c().get(i);
        String str1 = localj.a();
        String str2 = localj.b();
        BigDecimal localBigDecimal4 = localj.c();
        BigDecimal localBigDecimal5 = localj.d();
        int j = localj.e();
        com.paypal.android.b.g localg5;
        if (localj.f())
        {
          if ((str1 == null) || (str1.length() <= 0))
            break label496;
          localg5 = new com.paypal.android.b.g(paramContext, r.d, r.d);
          localg5.a(com.paypal.android.a.j.a("ANDROID_item") + ": " + localj.a());
          if ((localBigDecimal4 == null) || (localBigDecimal4.toString().length() <= 0))
            break label486;
          localg5.b(n.a(localBigDecimal4, paramString));
          label255: localLinearLayout1.addView(localg5);
        }
        while (true)
        {
          if ((str2 != null) && (str2.length() > 0))
          {
            TextView localTextView3 = q.a(r.f, paramContext);
            localTextView3.setText(com.paypal.android.a.j.a("ANDROID_item_num") + ": " + str2);
            localLinearLayout1.addView(localTextView3);
          }
          if ((localBigDecimal5 != null) && (localBigDecimal5.compareTo(BigDecimal.ZERO) > 0))
          {
            TextView localTextView2 = q.a(r.f, paramContext);
            localTextView2.setText(com.paypal.android.a.j.a("ANDROID_item_price") + ": " + n.a(localBigDecimal5, paramString));
            localLinearLayout1.addView(localTextView2);
          }
          if (j > 0)
          {
            TextView localTextView1 = q.a(r.f, paramContext);
            localTextView1.setText(com.paypal.android.a.j.a("ANDROID_quantity") + ": " + j);
            localLinearLayout1.addView(localTextView1);
          }
          if (i != -1 + paramm.c().c().size())
          {
            LinearLayout localLinearLayout2 = com.paypal.android.a.f.a(paramContext, 5, 5);
            localLinearLayout2.setVisibility(4);
            localLinearLayout1.addView(localLinearLayout2);
          }
          i++;
          break;
          label486: localg5.b("");
          break label255;
          label496: if ((localBigDecimal4 != null) && (localBigDecimal4.compareTo(BigDecimal.ZERO) > 0))
          {
            com.paypal.android.b.g localg4 = new com.paypal.android.b.g(paramContext, r.d, r.d);
            localg4.a(com.paypal.android.a.j.a("ANDROID_item") + ": " + com.paypal.android.a.j.a("ANDROID_item") + " " + (i + 1));
            localg4.b(localBigDecimal4.toString());
            localLinearLayout1.addView(localg4);
          }
        }
      }
    }
    else
    {
      BigDecimal localBigDecimal1 = paramm.b();
      if (localBigDecimal1 != null)
      {
        com.paypal.android.b.g localg1 = new com.paypal.android.b.g(paramContext, r.d, r.d);
        localg1.a(com.paypal.android.a.j.a("ANDROID_total"));
        localg1.b(n.a(localBigDecimal1, paramString));
        localLinearLayout1.addView(localg1);
      }
    }
    if (paramm.c() != null);
    for (BigDecimal localBigDecimal2 = paramm.c().a(); ; localBigDecimal2 = null)
    {
      if ((localBigDecimal2 != null) && (localBigDecimal2.compareTo(BigDecimal.ZERO) > 0))
      {
        com.paypal.android.b.g localg3 = new com.paypal.android.b.g(paramContext, r.d, r.d);
        localg3.a(com.paypal.android.a.j.a("ANDROID_tax"));
        localg3.b(n.a(localBigDecimal2, paramString));
        localLinearLayout1.addView(localg3);
      }
      if (paramm.c() != null);
      for (BigDecimal localBigDecimal3 = paramm.c().b(); ; localBigDecimal3 = null)
      {
        if ((localBigDecimal3 != null) && (localBigDecimal3.compareTo(BigDecimal.ZERO) > 0))
        {
          com.paypal.android.b.g localg2 = new com.paypal.android.b.g(paramContext, r.d, r.d);
          localg2.a(com.paypal.android.a.j.a("ANDROID_shipping"));
          localg2.b(n.a(localBigDecimal3, paramString));
          localLinearLayout1.addView(localg2);
        }
        return localLinearLayout1;
      }
    }
  }

  public final boolean onTouch(View paramView, MotionEvent paramMotionEvent)
  {
    return false;
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.paypal.android.MEP.b.f
 * JD-Core Version:    0.6.2
 */